<template>
  <div class="fixedNavbar">
    <div class="leftLogo">
      <img
        style="width: 100%; padding: 4px"
        src="../assets/image/logo.png"
        alt=""
      />
    </div>
    <div class="rightNav">
      <template v-for="(item, index) in navList" :key="index">
        <RouterLink :to="item.router">
          <div class="item">
            {{ item.name }}
          </div>
        </RouterLink>
      </template>
    </div>
  </div>
</template>

<script setup>
import { RouterLink } from 'vue-router'

const navList = [
  { name: '模型管理', router: '/' },
  { name: '数据集管理', router: '/gather' },
  { name: '资源管理GPU', router: '/server' },
  { name: '数据统计', router: '/dataSum' },
  { name: '榜单评测', router: '/createDrill3' }
]
</script>

<style lang="less" scoped>
.fixedNavbar {
  position: fixed;
  display: flex;
  align-items: center;
  width: 100vw;
  background-color: #1877ff;
  // background-color: #d4ecf5;
  height: var(--headerHight);
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  padding: 0 20px;
  position: relative;

  .leftLogo {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 120px;
    height: 100%;
  }

  .rightNav {
    display: flex;
    padding-left: 20px;
    height: 50px;
    a {
      font-size: 16px;
      color: #fff;
      padding: 18px 0 0 5px;
      margin-right: 15px;
      :hover {
        font-weight: bold;
      }
    }

    a.router-link-exact-active {
      font-weight: bold;
      border-bottom: 3.5px solid #4072c8;
      padding-bottom: -5px;
    }
  }

  .chat {
    position: absolute;
    right: 40px;

    img {
      width: 30px;
      height: 30px;
    }
    .text {
      color: #fff;
      padding-left: 10px;
    }
    :hover {
      font-weight: bold;
    }
  }
}
</style>
